Interview Questions and Answer
Options:
a. An object whose value cannot be changed once it is set.
b. type An object whose value can be changed once it is set.
c. Both
Reveal Answer
Options:
a. Invalid cast Exception
b. Argument Null Exception
c. Application Exception
d. System Exception
Reveal Answer
Options:
a. Boxing
b. UnBoxing
c. Implicit Casting
d. Explicit Casting
Reveal Answer
Options:
a. Reference Type
b. Value Type
Reveal Answer
Options:
a. ++, --
b. ? :, <<, >>
c. ==, sizeof
d. All the above
Reveal Answer
Options:
a. set condition (true)
b. set condition (false)
c. Both
Reveal Answer
Options:
a. Every optional argument in the procedure definition must specify a default value.
b. The default value for an optional argument must be a constant expression.
c. Every argument following an optional argument in the procedure definition must also be optional.
d. All the above
Reveal Answer
Options:
a. ch= (char) n n= (int) ch
b. Ch = n n = ch
c. char ch, int n ch = (int) n n = (char) ch
d. A, C
Reveal Answer
Options:
a. MethodCall(val1: 10, val2: 20)
b. MethodCall(val1 10, val2 20)
c. MethodCall(val1->10, val2->20)
d. None of the above
Reveal Answer
Options:
a. return the number of elements in first dimension.
b. return the number of elements in second dimension.
c. returns the number of characters in the first element of the array.
Reveal Answer
Options:
a. When you try to store a value of different data type that an array can store.
b. To store a value of sametype.
c. When we try to access an element of an array with an invalid index.
d. A and C
Reveal Answer
Options:
a. Using Length(0)
b. Using Length(1)
c. Using GetLength (1)
d. Using GetLength (0)
Reveal Answer
Options:
a. Using Array. Copy() method
b. Using Array .Clone() method
Reveal Answer
Options:
a. IndexOutOfRangeException
b. NullException
c. InvalidException
d. ApplicationException
Reveal Answer
Options:
a. When variable on RHS cannot be assigned to variable on LHS.
b. When variable on RHS can be assigned to variable on LHS.
c. When variable on LHS cannot be assigned to variable on RHS.
d. None
Reveal Answer
Options:
a. int
b. char
c. string
d. All the above
Reveal Answer
Options:
a. More reliability
b. More readability
c. Less readability
d. None
Reveal Answer
Options:
a. Reference
b. Value
c. Depends
d. Can't say
Reveal Answer
Options:
a. Sytem.Text.StringBuilder
b. Sytem.Test.StringBuilder
c. Sytem.Text.String.Builder
d. Sytem.Text.StringModifier.
Reveal Answer
Options:
a. Immutable
b. Mutable
c. Modifiable
d. None of the above
Reveal Answer
Options:
a. Runtime exception
b. Not a runtime exception
c. Compilation error
d. None
Reveal Answer
Options:
a. s = (string) n;
b. s = n.ToString ( );
c. s = string (n);
d. None of the above.
Reveal Answer
Options:
a. int [ ] ar=new int [10];
b. int [10] ar=new int [ ];
c. int [ ] ar=new int [ ];
d. All of the above
Reveal Answer
Options:
a. throws an exception as the value of a is 100 instead of 1
b. Prints: The value of b: False
c. Prints: The value of b: True
d. Prints: The value of b: Null
Reveal Answer
Options:
a. System.Nullable
b. System.Object
c. System.String
d. System.Type
Reveal Answer
Options:
a. Throws a compile error as the default constructor is not provided
b. Prints: Value received is: 7.8
c. Prints: Value received is: 3.14
d. Throws an error stating the variable “p” already contains a definition of p.
e. Throws an error stating an ambiguity of variable “p”.
Reveal Answer
Options:
a. System.Enum
b. System.ValueType
c. System.Int32
d. None of the above
Reveal Answer
Options:
a. Polymorphism
b. Encapsulation
c. Inheritance
d. Method Overriding
Reveal Answer
Options:
a. Gives an error on the code editor for not using “==”
b. Throws an exception for assigning a value in if.
c. Prints: This is the result!"
d. Gives a blank output
Reveal Answer
Bestdotnet google plus